import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        String s = in.nextLine();
        int count=0;
        int zimudaxie=0;
        int zimuxiaoxie = 0;
        int shuzi =0;
        int fuhao = 0;
        if(s.length()<=4)count+=5;
        if(s.length()<=7&&s.length()>=5)count+=10;
        if(s.length()>=8)count+=25;

        for(int i = 0; i<s.length();i++){
            if(s.charAt(i)>='a'&&s.charAt(i)<='z'&&zimuxiaoxie==0){
                count+=10;
                zimuxiaoxie++;
            }
            if(s.charAt(i)>='A'&&s.charAt(i)<='Z'&&zimudaxie==0){
                count+=10;
                zimudaxie++;
            }

            if(s.charAt(i)>='0'&&s.charAt(i)<='9'&&shuzi==0){
                count+=10;
                shuzi++;
            }
            if(s.charAt(i)>='0'&&s.charAt(i)<='9'&&shuzi==1){
                count+=10;
                shuzi++;
            }
            if(s.charAt(i)>='!'&&s.charAt(i)<='~'&&fuhao==0){
                count+=10;
                fuhao++;
            }
            if(s.charAt(i)>='!'&&s.charAt(i)<='~'&&fuhao==1){
                count+=15;
                fuhao++;
            }
        }
        if(zimudaxie!=0&&zimuxiaoxie==0&&shuzi!=0&&fuhao==0)count+=2;
        if(zimudaxie==0&&zimuxiaoxie!=0&&shuzi!=0&&fuhao==0)count+=2;
        if(zimudaxie!=0&&zimuxiaoxie==0&&shuzi!=0&&fuhao!=0)count+=2;
        if(zimudaxie==0&&zimuxiaoxie!=0&&shuzi!=0&&fuhao!=0)count+=2;
        if(zimudaxie!=0&&zimuxiaoxie!=0&&shuzi!=0&&fuhao!=0)count+=2;
        System.out.println(count);
        switch(count/10){
            case 9:System.out.print("VERY_SECURE");break;
            case 8:System.out.print("SECURE");break;
            case 7:System.out.print("VERY_STRONG");break;
            case 6:System.out.print("STRONG");break;
            case 5:System.out.print("AVERAGE");break;
            case 4:System.out.print("Weak");break;
            case 3:System.out.print("Weak");break;
            case 2:System.out.print("Weak");break;
            case 1:System.out.print("VERY_WEAK");break;
            case 0:System.out.print("VERY_WEAK");break;




        }


    }
}